package com.Vronsky.thread.test01;

import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.function.IntFunction;

import static java.lang.Thread.sleep;

@Slf4j
public class Test3 {
    public static void main(String[] args) throws InterruptedException {
//        Thread t1 = new Thread(()->{
//            try {
//                sleep(2000);
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }
//        }, "t1");
//        t1.start();
//        Thread.sleep(1000);
//        t1.interrupt();
//        log.debug(" 打断状态: {}", t1.isInterrupted());

        new ArrayList<>().stream().toArray(new IntFunction<String[]>() {
            @Override
            public String[] apply(int value) {
                return new String[value];
            }
        });
    }
}
